package com.sunrise.generico.util;

import java.util.Properties;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

public class ConfigUtil {
	private static final String PROPERTIES_FILENAME = "/nex.properties";

	public static String getProperty(final String key) {
		try {
			final Resource resource = new ClassPathResource(ConfigUtil.PROPERTIES_FILENAME);
			final Properties props = PropertiesLoaderUtils.loadProperties(resource);

			return props.getProperty(key);
		} catch (final Exception e) {
			System.out.println(e);
		}

		return null;

	}

}
